<?php include("header_liga_required.php"); ?>

<?php
	// default values
	$nrOfThirdSubDep = 2;	
	$nrOfRounds = 9;
?>

<table height="100%" cellSpacing="0" cellPadding="0" width="100%"
	border="0" bgcolor="#FFFFFF">

	<tr>
		<td id="leftFiller" valign="top" height="100%" rowspan="3"
			bgcolor="#666666">
		<table border="0" cellpadding="0" cellspacing="0" height="100%"
			width="8px">
			<tr>
				<td>&nbsp;</td>
			</tr>
		</table>
		</td>
		<td id="header" valign="top" width="100%">
		<table border="0" width="100%" cellpadding="3" cellspacing="0" bgcolor="#10425b">
                <tr>
                    <td bgcolor="#666666" width="40%">
                        <?php include("inc_title.html"); ?>
                    </td>
                    <td bgcolor="#666666" align="right" valign="top">&nbsp;
                          <span class="headerSmall">Huidige versie PLAYER.DBF: <?=CURRENT_PLAYER_DBF?>
                        <?php
                        if (isset($user) && $user->club_id == 100) {
                        ?>
                        <br/>
                        <a class="headerSmall" href="import_player.php">laad andere versie</a>
                        <?php
                        }
                        ?>
                        </span>
                    </td>
                </tr>
            </table>
            <table align="center" border="0" width="100%" height="90%" cellpadding="0" cellspacing="0" style="border-top:#BCDD10 4px solid;">
                <tr>
                    <?php include("inc_sublinks.php"); ?> 
                </tr>
			<tr>
				<td colspan="2" nowrap bgcolor="#BCDD10" height="4"><img
					src="../../assets/images/spacer.gif" alt="" height="1" width="1"></td>
			</tr>
			<tr>
				<td>&nbsp;</td>
				<td valign="top">
				<table align="left" cellspacing="10" width="100%">
					<tr>
						<td><span class="blackHeaderLarge">Zilveren Toren <?=CURRENT_ZT_YEAR?>
						- Paring kalender</span>
						<br/>Generator voor de paringen, laat toe om manueel ploegen te verschuiven.
						</td>
					</tr>
					<!-- Input nr of rounds -->
					<tr>
						<td>
						<table>
							<tr>
								<td>
								<strong>Aantal reeksen in afdeling 3</strong>&nbsp;&nbsp;
								<input style="text-align:center" type="text" name="nrOfThirdSubDep" 
									value="<?=$nrOfThirdSubDep?>" size="5" 
									onblur="" />
								</td>
								<td width="5%">&nbsp;</td>
								<td>
								<strong>Aantal ronden</strong>&nbsp;&nbsp;
								<input style="text-align:center" type="text" name="nrOfRounds" 
									value="<?=$nrOfRounds?>" size="5" 
									onblur="" />
								</td>
							</tr>
						</table>
						</td>
					</tr>
					<!-- Pairing table -->
					<tr>
						<td>
						<table border="0" cellspacing="0" cellpadding="0">
						<?php
						$nrOfColumns = ceil($nrOfRounds / 2);
						$borderStyle= "border-bottom:#DDDDDD solid 1px;border-top:#DDDDDD solid 1px;border-left:#DDDDDD solid 1px;border-right:#DDDDDD solid 1px";
						for ($i = 0; $i < $nrOfRounds; $i++) {
						?>
							<tr>
							<?php
							for ($j = 0; $j < $nrOfColumns; $j++) {
							?>
								<td width="3%" style="<?=$borderStyle?>">&nbsp;</td>
							<?php
							}
							?>
							</tr>
						<?php
						}
						?>
						</table>
						</td>
					</tr>
					<!-- Team rankings overview -->
					<tr>
						<td>
						<table>
							<tr>
								<td colspan="2" align="center">Afdeling 1</td>
								<td colspan="2" align="center">Afdeling 2A</td>
								<td colspan="2" align="center">Afdeling 2B</td>
								<td colspan="2" align="center">Afdeling 3A</td>
							</tr>
							<tr>
								<td>1</td>
								<td><select name="team1Dep1" dojoType="ComboBox" autoComplete="true" dataUrl="/dojo/suggest_team.php?dep=1&match=%{searchString}" maxListLength="10" mode="remote" onValueChanged="" style="text-align:center;width:50mm" /></td>
							</tr>
						</table>
						</td>
					</tr>
					<!-- Calendar overview -->
					<tr>
						<td></td>
					</tr>
				</table>
				</td>
			</tr>
		</table>
		</td>
	</tr>
</table>

<?php include("footer.php"); ?>